package com.wzl;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
* @Description: 启动类
* @author wzl
*/
@SpringBootApplication
public class EpidemicApp {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(EpidemicApp.class, args);
        ConfigurableEnvironment environment = context.getEnvironment();
        String port = environment.getProperty("server.port");
        String env = environment.getProperty("spring.profiles.active");

        System.out.println(
                "\n" +
                "\n" +
                "              _______  ______\n" +
                "             / ___/ / / / __ \\\n" +
                "            / /__/ /_/ / /_/ /\n" +
                "            \\___/\\__,_/ .___/\n" +
                "                     /_/       V1.3\n" +
                "\n" +
                "             EpidemicApp启动成功！" +
                "\n" +
                "             端口：" + port +
                "\n" +
                "             环境：" + env +
                "\n" +
                "\n"
        );
    }
}
